package com.uzai.console.entity.es;

import com.uzai.common.utils.EsIndexName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 企业微信群
 * @Auther: liuqi
 * @Date: 2022/8/28 11:33
 * @Description:
 */
@Document(indexName = EsIndexName.UZAI_WORKWX_GROUP_INFO, shards = 3, replicas = 2)
@Data
public class EsWorkWxGroupInfo {

    @ApiModelProperty("主键id：merId_deviceId_wxid")
    @Id
    @Field(type = FieldType.Keyword)
    private String id;

    @ApiModelProperty("运营商id")
    @Field(type = FieldType.Long)
    private Long merId;

    @ApiModelProperty("机器人微信id")
    @Field(type = FieldType.Keyword)
    private String deviceId;

    @ApiModelProperty("机器人唯一id")
    @Field(type = FieldType.Long)
    private Long deviceUniqueId;

    @ApiModelProperty("机器人类型id")
    @Field(type = FieldType.Integer)
    private Integer deviceType;

    @ApiModelProperty("群wxid")
    @Field(type = FieldType.Keyword)
    private String groupId;

    @ApiModelProperty("群名称")
    @Field(type = FieldType.Text)
    private String nickName;

    @ApiModelProperty("群创建人Wxid")
    @Field(type = FieldType.Keyword)
    private String createWxid;

    @ApiModelProperty("是否为群管理员 0否1是")
    @Field(type = FieldType.Integer)
    private int isAdmin;

    @ApiModelProperty("是否为群创建者 0否1是")
    @Field(type = FieldType.Integer)
    private int isCreate;

    @ApiModelProperty("群类型（0=内部群；1=外部群）")
    @Field(type = FieldType.Integer)
    private Integer groupType;

    @ApiModelProperty("群成员总数")
    @Field(type = FieldType.Integer)
    private Integer memberTotal;

    @ApiModelProperty("群创建时间")
    @Field(type = FieldType.Integer)
    private Integer createTime;

    @ApiModelProperty("修改时间")
    @Field(type = FieldType.Integer)
    private Integer updateTime;

    @ApiModelProperty("版本号")
    @Field(type = FieldType.Long)
    private Long version = 0L;

    @ApiModelProperty("群配置方案id")
    @Field(type = FieldType.Long)
    private Long managePlanId;

    @ApiModelProperty("备注")
    @Field(type = FieldType.Text)
    private String remark;
}
